package com.example.aics.assistant;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;
import dev.langchain4j.service.spring.AiService;

/** 独立聊天助手 */
@AiService(wiringMode = EXPLICIT ,  chatModel = "openAiChatModel", chatMemoryProvider = "chatMemoryProvider")
public interface SeparateChatAssistant {
      String chat(@MemoryId String memoryId, @UserMessage String message);

      @SystemMessage("你是我的好朋友，请用客家话回答问题")
      String chatWithSystemMessage(@MemoryId String memoryId,@UserMessage String message);

      @SystemMessage("你是我的好朋友，请用粤话回答问题。今天是{{current_date}}")
      String chatWithParam(@MemoryId String memoryId,@UserMessage String message);

      @SystemMessage(fromResource = "my-prompt-template.txt")
      String chatFromResource(@MemoryId String memoryId,@UserMessage String message);

      @SystemMessage(fromResource = "my-prompt-template2.txt")
      String  chatWithParamAndResource(@MemoryId String memoryId
                                       ,@UserMessage String message,@V("userName") String userName,@V("age") int age);
}
